/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 28463
 * Date: 2022—05—08
 * Time: 13:58
 */

/*class Car{
    //1.字段/属性 成员变量
    public String brand;//品牌
    public String type;//型号
    public double lenght;//长
    public double weight;//宽
    public double height;//高
    public String color;//颜色

    //2.行为/方法 成员方法
    public void DrivingFunction(){//开车
        System.out.println("行驶功能");
    }
    public void BrakeFunction(){//刹车
        System.out.println("刹车功能");
    }
    public void AccelerationFunction(){//加速
        System.out.println("加速功能");
    }
}*/
/*class Dog{
    //成员变量
    public String name;
    public int age;
    public String color;
    //成员类型
    public void wag(){
        System.out.println(name+"摇尾巴！");
    }
    public void bark(){
        System.out.println(name+"旺旺！");
    }
}*/

public class Date {
/*    public static void main(String[] args) {
        //通过new关键字实例化一个对象
        Dog dog = new Dog();
        System.out.println(dog.name);
        System.out.println(dog.age);
        System.out.println(dog.color);

        dog.name = "小孙";
        dog.color = "绿色";
        dog.age = 2;
        //使用成员类型
        dog.wag();
        dog.bark();

        Dog dog2 = new Dog();
        dog2.name = "小小孙";
        dog2.color ="红色";
        dog2.age = 3;
        System.out.println(dog2.name);
        System.out.println(dog2.color);
        System.out.println(dog2.age);
        Dog dog3 = new Dog();
        dog3.name = "小小小孙";
        dog3.color = "黄色";
        dog3.age =4;
        System.out.println(dog3.name);
        System.out.println(dog3.color);
        System.out.println(dog3.age);
    }*/

    public int year;
    public int month;
    int day;

    public Date(){
/*             this.year = 2000;
             this.month = 6;
             this.day = 22;*/
     /*   this(2008,4,24);*/
    }
/*    public Date(int year,int month,int day){
        this.year = year;
        this.month = month;
        this.day = day;
    }*/


    public Date(int year, int month, int day) {
        this.year = year;
        this.month = month;
        this.day = day;
    }

/*
    public Date(int year, int month) {
        this.year = year;
        this.month = month;
    }
*/

    public void printDate(){
        System.out.println(year+" "+month+" "+day);
    }
public static void main(String[] args) {
        Date date1 = new Date();
        date1.printDate();
/*        Date date2 = new Date(2001,6,25);
        date2.printDate();*/
  /*      data1.setDate(2021,5,21);
        data1.printDate();
        Date data2 = new Date();
        data2.setDate(2022,5,21);
        data2.printDate();
        Date data3 = new Date();
        data3.setDate(2023,5,21);
        data3.printDate();*/
}
}
